<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<link rel="stylesheet" type="text/css" media="screen" href="../../css/bootstrap.min.css">
</head>
<body>
<div class="col-xs-12 col-sm-12 col-md-12 col-lg-12">
	<form class="form-horizontal" onsubmit="return false" id="form">
		<fieldset>
			<div class='form-group'>
				<label class='col-md-2 control-label'>userid</label>
				<div class='col-md-10'>
					<input class='form-control' placeholder='userid' type='text' name='userid' id='userid' data-bv-notempty='true' data-bv-notempty-message='userid 不能为空'>
				</div>
			</div>
			<div class='form-group'>
				<label class='col-md-2 control-label'>serviceId</label>
				<div class='col-md-10'>
					<input class='form-control' placeholder='serviceId' type='text' name='serviceId' id='serviceId' data-bv-notempty='true' data-bv-notempty-message='serviceId 不能为空'>
				</div>
			</div>
			<div class='form-group'>
				<label class='col-md-2 control-label'>title</label>
				<div class='col-md-10'>
					<input class='form-control' placeholder='title' type='text' name='title' id='title' data-bv-notempty='true' data-bv-notempty-message='title 不能为空'>
				</div>
			</div>
			<div class='form-group'>
				<label class='col-md-2 control-label'>imageUrl</label>
				<div class='col-md-10'>
					<input class='form-control' placeholder='imageUrl' type='text' name='imageUrl' id='imageUrl' data-bv-notempty='true' data-bv-notempty-message='imageUrl 不能为空'>
				</div>
			</div>
			<div class='form-group'>
				<label class='col-md-2 control-label'>DefendantAttitude</label>
				<div class='col-md-10'>
					<input class='form-control' placeholder='DefendantAttitude' type='text' name='DefendantAttitude' id='DefendantAttitude' data-bv-notempty='true' data-bv-notempty-message='DefendantAttitude 不能为空'>
				</div>
			</div>
			<div class='form-group'>
				<label class='col-md-2 control-label'>myAttitude</label>
				<div class='col-md-10'>
					<input class='form-control' placeholder='myAttitude' type='text' name='myAttitude' id='myAttitude' data-bv-notempty='true' data-bv-notempty-message='myAttitude 不能为空'>
				</div>
			</div>
			<div class='form-group'>
				<label class='col-md-2 control-label'>Deadline</label>
				<div class='col-md-10'>
					<input class='form-control' placeholder='Deadline' type='text' name='Deadline' id='Deadline' data-bv-notempty='true' data-bv-notempty-message='Deadline 不能为空'>
				</div>
			</div>
			<div class='form-group'>
				<label class='col-md-2 control-label'>money</label>
				<div class='col-md-10'>
					<input class='form-control' placeholder='money' type='text' name='money' id='money' data-bv-notempty='true' data-bv-notempty-message='money 不能为空'>
				</div>
			</div>
			<div class='form-group'>
				<label class='col-md-2 control-label'>lawyerId</label>
				<div class='col-md-10'>
					<input class='form-control' placeholder='lawyerId' type='text' name='lawyerId' id='lawyerId' data-bv-notempty='true' data-bv-notempty-message='lawyerId 不能为空'>
				</div>
			</div>
			<div class='form-group'>
				<label class='col-md-2 control-label'>tradingState</label>
				<div class='col-md-10'>
					<input class='form-control' placeholder='tradingState' type='text' name='tradingState' id='tradingState' data-bv-notempty='true' data-bv-notempty-message='tradingState 不能为空'>
				</div>
			</div>
			<div class='form-group'>
				<label class='col-md-2 control-label'>freeOrPaid</label>
				<div class='col-md-10'>
					<input class='form-control' placeholder='freeOrPaid' type='text' name='freeOrPaid' id='freeOrPaid' data-bv-notempty='true' data-bv-notempty-message='freeOrPaid 不能为空'>
				</div>
			</div>
			<div class='form-group'>
				<label class='col-md-2 control-label'>freeOrPaidName</label>
				<div class='col-md-10'>
					<input class='form-control' placeholder='freeOrPaidName' type='text' name='freeOrPaidName' id='freeOrPaidName' data-bv-notempty='true' data-bv-notempty-message='freeOrPaidName 不能为空'>
				</div>
			</div>
			<div class='form-group'>
				<label class='col-md-2 control-label'>payId</label>
				<div class='col-md-10'>
					<input class='form-control' placeholder='payId' type='text' name='payId' id='payId' data-bv-notempty='true' data-bv-notempty-message='payId 不能为空'>
				</div>
			</div>
			<div class='form-group'>
				<label class='col-md-2 control-label'>payNumber</label>
				<div class='col-md-10'>
					<input class='form-control' placeholder='payNumber' type='text' name='payNumber' id='payNumber' data-bv-notempty='true' data-bv-notempty-message='payNumber 不能为空'>
				</div>
			</div>
			<div class='form-group'>
				<label class='col-md-2 control-label'>payMerchantNumber</label>
				<div class='col-md-10'>
					<input class='form-control' placeholder='payMerchantNumber' type='text' name='payMerchantNumber' id='payMerchantNumber' data-bv-notempty='true' data-bv-notempty-message='payMerchantNumber 不能为空'>
				</div>
			</div>
			<div class='form-group'>
				<label class='col-md-2 control-label'>bestAnswerId</label>
				<div class='col-md-10'>
					<input class='form-control' placeholder='bestAnswerId' type='text' name='bestAnswerId' id='bestAnswerId' data-bv-notempty='true' data-bv-notempty-message='bestAnswerId 不能为空'>
				</div>
			</div>
			<div class='form-group'>
				<label class='col-md-2 control-label'>hot</label>
				<div class='col-md-10'>
					<input class='form-control' placeholder='hot' type='text' name='hot' id='hot' data-bv-notempty='true' data-bv-notempty-message='hot 不能为空'>
				</div>
			</div>
			<div class='form-group'>
				<label class='col-md-2 control-label'>type</label>
				<div class='col-md-10'>
					<input class='form-control' placeholder='type' type='text' name='type' id='type' data-bv-notempty='true' data-bv-notempty-message='type 不能为空'>
				</div>
			</div>
			<div class='form-group'>
				<label class='col-md-2 control-label'>likeNumber</label>
				<div class='col-md-10'>
					<input class='form-control' placeholder='likeNumber' type='text' name='likeNumber' id='likeNumber' data-bv-notempty='true' data-bv-notempty-message='likeNumber 不能为空'>
				</div>
			</div>
			<div class='form-group'>
				<label class='col-md-2 control-label'>collectNumber</label>
				<div class='col-md-10'>
					<input class='form-control' placeholder='collectNumber' type='text' name='collectNumber' id='collectNumber' data-bv-notempty='true' data-bv-notempty-message='collectNumber 不能为空'>
				</div>
			</div>
			<div class='form-group'>
				<label class='col-md-2 control-label'>deleteState</label>
				<div class='col-md-10'>
					<input class='form-control' placeholder='deleteState' type='text' name='deleteState' id='deleteState' data-bv-notempty='true' data-bv-notempty-message='deleteState 不能为空'>
				</div>
			</div>
			<div class='form-group'>
				<label class='col-md-2 control-label'>deleteTime</label>
				<div class='col-md-10'>
					<input class='form-control' placeholder='deleteTime' type='text' name='deleteTime' id='deleteTime' data-bv-notempty='true' data-bv-notempty-message='deleteTime 不能为空'>
				</div>
			</div>
			<div class='form-group'>
				<label class='col-md-2 control-label'>content</label>
				<div class='col-md-10'>
					<input class='form-control' placeholder='content' type='text' name='content' id='content' data-bv-notempty='true' data-bv-notempty-message='content 不能为空'>
				</div>
			</div>
			<div class='form-group'>
				<label class='col-md-2 control-label'>DefendantUrl</label>
				<div class='col-md-10'>
					<input class='form-control' placeholder='DefendantUrl' type='text' name='DefendantUrl' id='DefendantUrl' data-bv-notempty='true' data-bv-notempty-message='DefendantUrl 不能为空'>
				</div>
			</div>
			<div class='form-group'>
				<label class='col-md-2 control-label'>MyAppeal</label>
				<div class='col-md-10'>
					<input class='form-control' placeholder='MyAppeal' type='text' name='MyAppeal' id='MyAppeal' data-bv-notempty='true' data-bv-notempty-message='MyAppeal 不能为空'>
				</div>
			</div>
			<div class='form-group'>
				<label class='col-md-2 control-label'>replyNumber</label>
				<div class='col-md-10'>
					<input class='form-control' placeholder='replyNumber' type='text' name='replyNumber' id='replyNumber' data-bv-notempty='true' data-bv-notempty-message='replyNumber 不能为空'>
				</div>
			</div>
			<div class='form-group'>
				<label class='col-md-2 control-label'>state</label>
				<div class='col-md-10'>
					<input class='form-control' placeholder='state' type='text' name='state' id='state' data-bv-notempty='true' data-bv-notempty-message='state 不能为空'>
				</div>
			</div>


			<div class="form-actions">
				<div class="row" align="center">
					<div class="col-md-12">
					    <button class="btn btn-primary" onclick="location.href='mfflConsultationList.html'">返回</button>
						<button class="btn btn-primary" type="submit" onclick="add()">
							<i class="fa fa-save"></i> 保存
						</button>
					</div>
				</div>
			</div>

		</fieldset>
	</form>
</div>
	<script type="text/javascript" src="../../js/libs/jquery-2.1.1.min.js"></script>
	<script type="text/javascript" src="../../js/jq.js"></script>
	<script type="text/javascript" src="../../js/plugin/bootstrapvalidator/bootstrapValidator.min.js"></script>
	<script type="text/javascript" src="../../js/common.js"></script>
	<script type="text/javascript" src="../../layui/layui.js"></script>
	<script type="text/javascript">
		layui.use(['layer','laydate'], function(){
		    var layer = layui.layer;
		});
		
		function add() {
			$('#form').bootstrapValidator();
			var bootstrapValidator = $("#form").data('bootstrapValidator');
			bootstrapValidator.validate();
		    if(!bootstrapValidator.isValid()){
			   return;
		    }
		    
		    var formdata = $("#form").serializeObject();

			$.ajax({
				type : 'post',
				url : '/mfflConsultations',
				contentType: "application/json; charset=utf-8",  
				data : JSON.stringify(formdata),
				success : function(data) {
					layer.msg("添加成功", {shift: -1, time: 1000}, function(){
                        location.href = "mfflConsultationList.html";
                    });
				}
			});
		}
		
	</script>
</body>
</html>
